/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */
package com.yami.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.model.StockChangeReason;
import com.yami.shop.common.util.PageParam;

import java.util.List;

/**
 *
 *
 * @author LGH
 * @date 2021-09-07 16:04:18
 */
public interface StockChangeReasonService extends IService<StockChangeReason> {

    /**
     * 分页查询出入库原因
     * @param page
     * @param stockChangeReason
     * @return
     */
    IPage<StockChangeReason> pageByParams(PageParam<StockChangeReason> page, StockChangeReason stockChangeReason);

    /**
     * 保存出入库原因
     * @param stockChangeReason
     */
    void saveInfo(StockChangeReason stockChangeReason);

    /**
     * 更新出入库原因
     * @param stockChangeReason
     */
    void updateInfo(StockChangeReason stockChangeReason);

    /**
     * 根据参数获取出入库原因
     * @param stockChangeReason
     * @return
     */
    List<StockChangeReason> listByParams(StockChangeReason stockChangeReason);

    /**
     * 改变出入库原因状态
     * @param shopId
     * @param stockChangeReasonId
     * @param status
     */
    void changeStatus(Long shopId, Long stockChangeReasonId, Integer status);

    /**
     * 根据id与店铺id获取出入库原因
     * @param stockChangeReasonId
     * @param shopId
     * @return
     */
    StockChangeReason getInfoByIdAndShopId(Long stockChangeReasonId, Long shopId);
}
